package com.smart.five.ioc.injectfun.lookup;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author junrui.wang
 * @create 2018/6/6
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("com/smart/five/ioc/injectfun/lookup/beans.xml");
        MagicBoss magicBoss = (MagicBoss) ac.getBean("magicBoss");
        Car car1 = magicBoss.getCar();
        System.out.println(car1);
        Car car2 = magicBoss.getCar();
        System.out.println(car2);

    }
}
